T1792 - Desynchronize crm.lead and res_partner email. #1654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default, the behavior of the "email" field in the "crm.lead" model is to sync with the partner's email. This synchronization causes issues and generates errors because the email address is tied to a mailing contact. A solution that addresses tasks T1792, T1552, and T1737 is to initially prefill this field with the selected partner’s email but then allow the email to become independent of the partner. This makes sense in cases like when a church has a general contact email, but for a specific event, the contact is made using a different email address.
However, this solution has the drawback of no longer allowing a simultaneous update of all "crm.lead" records for a partner if the contact email changes.